package com.cloud.drore.eboss.operation.controller;

import com.cloud.drore.eboos.common.base.ResultMessage;
import com.cloud.drore.eboss.operation.entity.po.ProductToDistributorPo;
import com.cloud.drore.eboss.operation.entity.po.SaveRelationListPo;
import com.cloud.drore.eboss.operation.service.IProductToDistributorSettingService;
import io.swagger.annotations.Api;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 浙江卓锐科技股份有限公司 版权所有  Copyright 2018<br>
 *
 * @Description: 门票-设置分销商<br>
 * @Project: eboos <br>
 * @CreateDate: Created in 2018/2/1 15:50 <br>
 * @Author: <a href="1451173193@qq.com">杨亮</a>
 */
@RestController
@RequestMapping("/relationTicket")
@Api(value = "/门票-设置分销商", description = "产品管理-门票-设置分销商-杨亮")
public class TicketToDistributorSettingController {
    @Resource
    IProductToDistributorSettingService productToDistributorSettingService;
    @GetMapping("/getDistributorListByTicketInfo/{mainId}")
    public ResultMessage getDistributorListByTicket(@PathVariable("mainId") Long mainId){
       return  productToDistributorSettingService.getDistributorListByTicket(mainId);
    }
    @PostMapping("/saveTicketRelationList")
    public ResultMessage saveTicketRelationList(@RequestBody SaveRelationListPo po){
        return  productToDistributorSettingService.saveProductRelationList(po);
    }

}
